import { BasicFetchResult } from '@/api/model/baseModel'

/**
 * 菜单模型
 */
export interface MenuItemModel {
  id: number
  parent_id?: number
  level?: string
  name?: string
  code?: string
  icon?: string
  route?: string
  component?: string
  redirect?: string
  is_hidden?: number
  type: 'M' | 'B' | 'L'
  status: 10 | 20
  sort?: number
  created_by?: any
  updated_by?: any
  create_time?: string
  update_time?: string
  is_delete?: 0 | 1
  remark?: string
  children?: MenuItemModel[]
}

/**
 * 菜单请求参数
 */
export interface MenuParams {
  name?: string
  code?: string
  is_hidden?: string
  status?: string
  betweenTime?: string[]
}

export type MenuListGetResultModel = BasicFetchResult<MenuItemModel>
